package xyz.csmcool.imroom.service;

import xyz.csmcool.imroom.entity.UserFriend;
import com.baomidou.mybatisplus.extension.service.IService;
import xyz.csmcool.imroom.entity.vo.UserFriendVo;
import xyz.csmcool.imutil.dto.UserDto;
import xyz.csmcool.imutil.webVo.MyPage;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author csmcool
 * @since 2022-08-15
 */
public interface IUserFriendService extends IService<UserFriend> {

    /**
     * get my friends
     * @param page
     * @param limit
     * @param uid
     * @return
     */
    MyPage<UserDto> getMyFriend(Long page, Long limit, Integer uid);

    /**
     * 查找我的朋友
     * @param page
     * @param limit
     * @param uid
     * @param name
     * @return
     */
    MyPage<UserDto> getMyFriendByName(Long page, Long limit, Integer uid,String name);

    /**
     * 是否是朋友*
     * @param uid
     * @param fid
     * @return
     */
    Boolean isFriend(Integer uid,Integer fid);

    /**
     * 查看添加我为朋友的人
     * @param page
     * @param limit
     * @param uid
     * @return
     */
    MyPage<UserFriendVo> getAddMeFriend(Long page, Long limit, Integer uid);

    /**
     * 审核朋友
     * @param uid
     * @param fid
     * @param isPass *
     */
    void examineFriend(Integer uid,Integer fid,Integer isPass);

    /**
     * 朋友之间状态
     * @param uid
     * @param fid
     * @return
     */
    Integer selectUserFriendStatus(Integer uid, Integer fid);

    /**
     * 添加好友
     * @param uid
     * @param fid
     * @return
     */
    void addFriend(Integer uid,Integer fid);
}
